package com.eas.biz.dao.user.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.eas.biz.dao.user.dataobject.TeacherDO;
import com.eas.biz.dao.user.interfaces.TeacherDao;
import com.eas.biz.framework.BaseQuery;
import com.eas.biz.framework.dao.GenericDaoImpl;

@Repository("teacherDao")
public class TeacherDaoImpl extends GenericDaoImpl<TeacherDO> implements TeacherDao {

    public TeacherDO selectById(long id) {
        return selectById("Teacher.selectById", id);
    }

    public long insert(TeacherDO teacher) {
        return insert("Teacher.add", teacher);
    }

    public int deleteById(long id) {
        return deleteById("Teacher.deleteById", id);
    }

    public int update(TeacherDO teacher) {
        return update("Teacher.update", teacher);
    }

    public List<TeacherDO> selectByQuery(BaseQuery query) {
        return selectByQuery("Teacher.selectByQuery", query);
    }

    public int countByQuery(BaseQuery query) {
        return countByQuery("Teacher.countByQuery", query);
    }

}
